package com.k8.common.executor;

import com.k8.common.annotation.SPI;
import com.k8.rpc.url.URL;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.ScheduledExecutorService;

import static com.k8.common.constants.SpiConstants.DEFAULT_EXECUTOR_REPOSITORY;

@SPI(DEFAULT_EXECUTOR_REPOSITORY)
public interface ExecutorRepository {
    /**
     * 具体ExecutorService实现ThreadPool {@link com.k8.common.executor.threadPool.ThreadPool}
     * */
    ExecutorService getExecutorService(URL url);


    ScheduledExecutorService getScheduledExecuteService(URL url);

}
